package com.kid.keep.dao.item;

import com.kid.keep.po.CheckItemStandard;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description CheckItemStandard dao
 * @Author JOHN
 * @Create 2019-01-10
 * @Since 1.0.0
 */
@Repository
public class CheckItemStandardRepository extends ServiceImpl<ICheckItemStandardMapper, CheckItemStandard> implements ICheckItemStandardRepository {


    @Override
    public List<CheckItemStandard> findAllByItemIdAndGenderAndAge(Long itemId, Integer gender, Integer age) {
        return this.baseMapper.selectList(new QueryWrapper<CheckItemStandard>().lambda().eq(CheckItemStandard::getItemId, itemId).eq(CheckItemStandard::getGender, gender).eq(CheckItemStandard::getAge, age));
    }

    @Override
    public List<CheckItemStandard> findAllByItemId(Long itemId) {
        return this.baseMapper.selectList(new QueryWrapper<CheckItemStandard>().lambda().eq(CheckItemStandard::getItemId, itemId));
    }
}


